{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">用户卡片管理</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form action="" method="post" class="ajax-form">
                <button type="button" class="layui-btn layui-btn-danger layui-btn-small ajax-action" data-action="{:url('admin/user_collect/delete')}">删除</button>
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 15px;"><input type="checkbox" class="check-all"></th>
                        <th style="width: 30px;">ID</th>
                        <th>用户名</th>
                        <th>帖子</th>
                        <th>二手车</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="usercollect_list" item="vo"}
                    <tr>
                        <td><input type="checkbox" name="ids[]" value="{$vo.id}">
                        <td>{$vo.id}</td>
                        <td>{$user_list[$vo["user_id"]]}</td>
                        <td>{$article_list[$vo["article_id"]]}</td>
                        <td>{$usedtruck_list[$vo["used_truck_id"]]}</td>
                        <td>
                            <a href="{:url('admin/user/index',['keyword'=>$user_list[$vo['user_id']]])}" class="layui-btn layui-btn-normal layui-btn-mini">查看用户</a>
                            <a href="{:url('admin/user_collect/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <!--分页-->
                {$usercollect_list->render()}
                </form>
            </div>
        </div>
    </div>
</div>
{/block}